package com.qdaily.ui.net.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created with IntelliJ IDEA.
 * User: Felix
 * Date: 4/1/15
 * Time: 17:39
 * QQ:74104
 * Email:lovejiuwei@gmail.com
 */
public class ArticleLists implements Parcelable {
    private ArticleFeeds banners = new ArticleFeeds();
    private ArticleFeeds feeds = new ArticleFeeds();
    private ArticleFeeds searches = new ArticleFeeds();
    private int total_number = 0;

    public ArticleFeeds getBanners() {
        return banners;
    }

    public void setBanners(ArticleFeeds banners) {
        this.banners = banners;
    }

    public ArticleFeeds getFeeds() {
        return feeds;
    }

    public void setFeeds(ArticleFeeds feeds) {
        this.feeds = feeds;
    }

    public ArticleFeeds getSearches() {
        return searches;
    }

    public void setSearches(ArticleFeeds searches) {
        this.searches = searches;
    }

    public int getTotal_number() {
        return total_number;
    }

    public void setTotal_number(int total_number) {
        this.total_number = total_number;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.banners, 0);
        dest.writeParcelable(this.feeds, 0);
        dest.writeParcelable(this.searches, 0);
        dest.writeInt(this.total_number);
    }

    public ArticleLists() {
    }

    private ArticleLists(Parcel in) {
        this.banners = in.readParcelable(ArticleFeeds.class.getClassLoader());
        this.feeds = in.readParcelable(ArticleFeeds.class.getClassLoader());
        this.searches = in.readParcelable(ArticleFeeds.class.getClassLoader());
        this.total_number = in.readInt();
    }

    public static final Parcelable.Creator<ArticleLists> CREATOR = new Parcelable.Creator<ArticleLists>() {
        public ArticleLists createFromParcel(Parcel source) {
            return new ArticleLists(source);
        }

        public ArticleLists[] newArray(int size) {
            return new ArticleLists[size];
        }
    };

    @Override
    public String toString() {
        return "ArticleLists{" +
                "banners=" + banners +
                ", feeds=" + feeds +
                ", searches=" + searches +
                ", total_number=" + total_number +
                '}';
    }
}
